
package puziran.party.dao.impl;

import java.util.Map;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import puziran.party.dao.OperatorDao;
import puziran.party.domain.Operator;

public class OperatorDaoImpl extends SqlMapClientDaoSupport implements OperatorDao{

	@Override
	public String insert(Operator operator) {
		return (String) getSqlMapClientTemplate().insert("iBatisInsertOperator",operator);
	}

	@Override
	public Operator selectOperatorByPartyIdAndPasswordAndOperator(
			Map<String, Object> map) {
		return (Operator)this.getSqlMapClientTemplate().queryForObject("iBatisSelectOperatorByPartyIdAndPasswordAndOperator", map);
	}

	@Override
	public int updateOperartorByPartyIdAndOperator(Map<String, String> operatorMap) {
		return this.getSqlMapClientTemplate().update("iBatisUpdateOperatorByPartyIdAndOperator", operatorMap);
	}

}

